<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <ul>
    <li>12312312</li>
    <li>4564565464</li>
    <li>56856856856</li>
  </ul>

  <script>
    var list = document.querySelectorAll('li')

    for(var i = 0; i < list.length; i++) {
      list[i].onmouseover = function() {
        this.style.background = 'pink'
      }
      list[i].onmouseout = function() {
        this.style.background = ''
      }
    }
  </script>
</body>
</html>